package com.spring.shiro.main.common.utils;

import org.apache.commons.codec.Charsets;
import org.springframework.util.DigestUtils;

public class DigestUtis extends DigestUtils {
	public static String md5Hex(final String data) {
		return DigestUtils.md5DigestAsHex(data.getBytes(Charsets.UTF_8));
	}
	
	public static String md5Hex(final byte[] bytes) {
		return DigestUtils.md5DigestAsHex(bytes);
	}
}
